<?php
/* $Id: adWidget.php 38 2008-01-10 03:19:43Z chinello $ */
/**
 * Classe que reune funções comuns a todos os widgets
 *
 * @package 		adphpgtk
 * @subpackage		adphpgtk.widget
 * @version 		$Revision: 38 $
 * @modifiedby 		$LastChangedBy: chinello $
 * @lastmodified 	$Date: 2008-01-10 03:19:43 +0000 (Thu, 10 Jan 2008) $
 */

class adWidget {

	public function __call($metodo, $parametros) {

		// Se o método chamado era um evento (sinal)
		if (ereg('^on', $metodo)) {

			$evento = strtolower(str_replace('on', '', $metodo));

			$this->instance->connect_simple($evento, $parametros[0]);
		}
	}

	public function getInstance() {
		return $this->instance;
	}

	public function showAll() {
		$this->instance->show_all();
	}

	public function show() {
		$this->instance->show();
	}
}
?>
